Ejemplo n.º 1
0
/*********************************************************************************************
>	void CWinScroller::HandleScrollMessage(UINT32 nSBCode, UINT32 nPos)

	Author:		Marc_Power (Xara Group Ltd) <*****@*****.**>
	Created:	6/10/04
	Purpose:	Process a windows scroller event

**********************************************************************************************/ 
void CWinScroller::HandleScrollMessage(UINT32 nSBCode, UINT32 nPos)
{
	switch(nSBCode)
	{
	case SB_PAGEDOWN:
		PageDown() ;
		break ;
	case SB_PAGEUP:
		PageUp() ;
		break ;
	case SB_LINEDOWN:
		LineDown() ;
		break ;
	case SB_LINEUP:
		LineUp();
		break ;
	case SB_THUMBTRACK:
	case SB_THUMBPOSITION:
		// See KB article Q166473 - nPos is a legacy 16 bit coordinate. 
		// Replace it with true 32-bit scroll position
		SCROLLINFO si;
		si.cbSize = sizeof(SCROLLINFO);
		si.fMask = SIF_TRACKPOS;
		GetScrollInfo(&si);
		nPos = si.nTrackPos;

		XLONG pos = 0;
		pos +=nPos;
		SetScrollPos(pos , true);
		break;
	}
}
Ejemplo n.º 2
0
void wxVideoTerminal::OnScrollBar(wxScrollWinEvent &evt)
{
	if (evt.GetOrientation() == wxVERTICAL)
	{
		if (evt.GetEventType() == wxEVT_SCROLLWIN_BOTTOM)
			//wxLogDebug("You scrollwin Bottom: %d", evt.GetPosition())
			;

		else if (evt.GetEventType() == wxEVT_SCROLLWIN_TOP)
			//wxLogDebug("You scrollwin Top: %d", evt.GetPosition())
			;

		else if (evt.GetEventType() == wxEVT_SCROLLWIN_LINEDOWN)
			LineDown();

		else if (evt.GetEventType() == wxEVT_SCROLLWIN_LINEUP)
			LineUp();

		else if (evt.GetEventType() == wxEVT_SCROLLWIN_PAGEUP)
			PageUp();

		else if (evt.GetEventType() == wxEVT_SCROLLWIN_PAGEDOWN)
			PageDown();

		else if (evt.GetEventType() == wxEVT_SCROLLWIN_THUMBTRACK || 
			evt.GetEventType() == wxEVT_SCROLLWIN_THUMBRELEASE)
		{
			int scroll_pos = m_firstline_row + evt.GetPosition();
			UpdateScrollPos(scroll_pos);
		}
	}
}
Ejemplo n.º 3
0
void FollowLine() //Needs better logic just this for tests
{
		if(isOnLine())
		{
			MoveForward(0.05,autospeed);
		}
		else
		{
			while(!isOnLine())
			{
					TurnToIR();
					if(facingIR() && !isOnLine())
					{
						TurnLeft(0.05,autospeed);
					}
					MoveForward(0.05,autospeed);
					LineDown();
			}
		}
}
Ejemplo n.º 4
0
task main()
{
	//waitForStart();
	LineUp();
	/*Tests*/
	GoToIR();
	bool LightGoDown = false;
	if(SensorValue[Sensei] == 1)
	{
		LightGoDown = true;
	}
	MoveBackwards(0.1,50);
	while(LightGoDown)
	{
		LineDown();
		FollowLine();
		if(AtObject())
		{
			break;
		}
	}
	LineUp();
	//testMovement();
}
int deroule_repertoire_classical_save(int xrep, int yrep, char name_of_rep[25])
{

//////////////////////LISTE DOSSIERS ETC///////////////////////////////////////
petitchiffre.Print("Content of SAVES folder:",xrep+10,yrep+170);
ol::Rect BackDeroule(ol::Vec2D(xrep,yrep+155),ol::Vec2D(245,185));
BackDeroule.SetRoundness(15);
BackDeroule.Draw(CouleurConfig.WithAlpha(0.7));

for (int y=0;y<8;y++)
{
ol::Rect OverFile(ol::Vec2D(xrep+5,(yrep+185+(y*20)-10)),ol::Vec2D(200,20));
OverFile.SetRoundness(7.5);
//affichage quiest selectionné
if(strcmp(savefile_name,list_save_files[savefile_selected])==0 && (savefile_selected==(y+line_save)))
{OverFile.Draw(CouleurFond.WithAlpha(0.5));}

if(window_focus_id==W_SAVE && mouse_x>xrep+5 && mouse_x<xrep+155 && mouse_y>(yrep+175+(y*20)) && mouse_y<(yrep+190+(y*20)))
{
OverFile.DrawOutline(CouleurLigne);
}

petitpetitchiffre.Print(list_save_files[line_save+y],xrep+10,yrep+185+(y*20));
}
//nom du spectacle
ol::Rect FrameSelected(ol::Vec2D(xrep+5,yrep+347),ol::Vec2D(240,30));
FrameSelected.SetRoundness(7.5);
FrameSelected.Draw(CouleurConfig);
if(window_focus_id==W_SAVE && mouse_x>xrep+5 && mouse_x<xrep+245 && mouse_y>yrep+347 && mouse_y<yrep+377)
{
FrameSelected.DrawOutline(CouleurLigne);
}
FrameSelected.SetLineWidth(epaisseur_ligne_fader);
FrameSelected.DrawOutline(CouleurLigne.WithAlpha(alpha_blinker));
petitchiffre.Print(savefile_name,xrep+10,yrep+365);
//////////////////UP DOWN LINE save/////////////////////
ol::Circle LineUp(ol::Vec2D(xrep+220,yrep+200),12);
LineUp.Draw(CouleurFond);
ol::Circle LineDown(ol::Vec2D(xrep+220,yrep+310),12);
LineDown.Draw(CouleurFond);
if(window_focus_id==W_SAVE && mouse_x>xrep+208 && mouse_x<xrep+232)
{
if(mouse_y>yrep+188 && mouse_y<yrep+212)
{
LineUp.Draw(CouleurSurvol);
}
else if(mouse_y>yrep+298 && mouse_y<yrep+322)
{
LineDown.Draw(CouleurSurvol);
}
}
petitchiffre.Print("-",xrep+216,yrep+205);
petitchiffre.Print("+",xrep+216,yrep+315);
LineUp.DrawOutline(CouleurLigne);
LineDown.DrawOutline(CouleurLigne);
///////////////////////////////////////////////////////////////////////////////
ol::Rect SaveB(ol::Vec2D(xrep+40,yrep+390),ol::Vec2D(70,30));
SaveB.SetRoundness(7.5);
if(window_focus_id==W_SAVE && mouse_x>xrep+40 && mouse_x<xrep+110 && mouse_y>yrep+390 && mouse_y<yrep+420)
{
SaveB.Draw(CouleurSurvol);
}
petitchiffre.Print("SAVE",xrep+55,yrep+410);
SaveB.DrawOutline(CouleurLigne);

////////////////////////////////////////////////////////////////////////////////

ol::Rect LoadB(ol::Vec2D(xrep+140,yrep+390),ol::Vec2D(70,30));
LoadB.SetRoundness(7.5);
if(window_focus_id==W_SAVE && mouse_x>xrep+140 && mouse_x<xrep+210 && mouse_y>yrep+390 && mouse_y<yrep+420)
{
LoadB.Draw(CouleurSurvol);
}
petitchiffre.Print("LOAD",xrep+155,yrep+410);
LoadB.DrawOutline(CouleurLigne);

////////////////////////////////////////////////////////////////////////////////

ol::Rect ResetB(ol::Vec2D(xrep+280,yrep+390),ol::Vec2D(70,30));
ResetB.SetRoundness(7.5);

if(window_focus_id==W_SAVE && mouse_x>xrep+280 && mouse_x<xrep+350 && mouse_y>yrep+390 && mouse_y<yrep+420)
{
ResetB.Draw(CouleurSurvol);
}
petitchiffre.Print("RESET",xrep+295,yrep+410);
ResetB.DrawOutline(CouleurLigne);


return(0);
}
int deroule_repertoire_export_import(int xrep, int yrep, char name_of_rep[25])
{

//////////////////////LISTE DOSSIERS ETC///////////////////////////////////////
petitchiffre.Print("Content of import_export folder:",xrep+10,yrep+170);
ol::Rect BackDeroule(ol::Vec2D(xrep,yrep+155),ol::Vec2D(245,185));
BackDeroule.SetRoundness(15);
BackDeroule.Draw(CouleurConfig.WithAlpha(0.7));

for (int y=0;y<8;y++)
{
ol::Rect OverFile(ol::Vec2D(xrep+5,(yrep+185+(y*20)-10)),ol::Vec2D(200,20));
OverFile.SetRoundness(7.5);

//affichage qui est selectionné
if(strcmp(importfile_name,list_import_files[importfile_selected])==0 && (importfile_selected==(y+line_import)))
{OverFile.Draw(CouleurFond.WithAlpha(0.5));}


if(window_focus_id==W_SAVE && mouse_x>xrep+5 && mouse_x<xrep+155 && mouse_y>(yrep+175+(y*20)) && mouse_y<(yrep+190+(y*20)))
{
OverFile.DrawOutline(CouleurLigne);
}
petitpetitchiffre.Print(list_import_files[line_import+y],xrep+10,yrep+185+(y*20));

 //fin des 8 lignes
}



//nom fichier save laod
ol::Rect FrameSelected(ol::Vec2D(xrep+5,yrep+347),ol::Vec2D(240,30));
FrameSelected.SetRoundness(7.5);
FrameSelected.Draw(CouleurConfig);



//selection depuis chaine de caracteres pour export plot


if(window_focus_id==W_SAVE && mouse_x>xrep+5 && mouse_x<xrep+5+200 && mouse_y>yrep+347 && mouse_y<yrep+367)
{
FrameSelected.DrawOutline(CouleurLigne);
}




FrameSelected.SetLineWidth(epaisseur_ligne_fader);
FrameSelected.DrawOutline(CouleurLigne.WithAlpha(alpha_blinker));
petitchiffre.Print(importfile_name,xrep+10,yrep+365);
petitpetitchiffre.Print(string_typeexport_view,xrep+150,yrep+375);

petitpetitchiffre.Print("Name must have extension: ",xrep+250,yrep+170 );
petitchiffre.Print("Ascii: .asc .txt or .alq",xrep+250,yrep+185 );
petitchiffre.Print("PDF: .pdf",xrep+250,yrep+200 );
petitpetitchiffre.Print("Schwarzpeter: no extension",xrep+250,yrep+215 );

//////////////////UP DOWN LINE IMPORT/////////////////////
ol::Circle LineUp(ol::Vec2D(xrep+220,yrep+200),12);
LineUp.Draw(CouleurFond);
ol::Circle LineDown(ol::Vec2D(xrep+220,yrep+310),12);
LineDown.Draw(CouleurFond);
if(window_focus_id==W_SAVE && mouse_x>xrep+208 && mouse_x<xrep+232)
{
if(mouse_y>yrep+188 && mouse_y<yrep+212)
{
LineUp.Draw(CouleurSurvol);
}
else if(window_focus_id==W_SAVE && mouse_y>yrep+298 && mouse_y<yrep+322)
{
LineDown.Draw(CouleurSurvol);
}
}
petitchiffre.Print("-",xrep+216,yrep+205);
petitchiffre.Print("+",xrep+216,yrep+315);
LineUp.DrawOutline(CouleurLigne);
LineDown.DrawOutline(CouleurLigne);


/////////////////////////////SAVE LOAD && CONDITIONS////////////////////////////////
switch (index_export_choice)
{
case 0://ascii
enable_export=1;
enable_import=1;
break;
case 1://schwz
enable_export=0;
enable_import=1;
break;
case 2://alq
enable_export=0;
enable_import=1;
break;
case 3://pdf
enable_export=1;
enable_import=0;
break;

}
////////////////////////////////////////////////////////////////////////////////
if(enable_export==1)
{
ol::Rect SaveExport(ol::Vec2D(xrep+40,yrep+390),ol::Vec2D(70,30));
SaveExport.SetRoundness(7.5);
if(window_focus_id==W_SAVE && mouse_x>xrep+40 && mouse_x<xrep+110 && mouse_y>yrep+390 && mouse_y<yrep+420)
{
SaveExport.Draw(CouleurSurvol);
}
petitchiffre.Print("SAVE",xrep+55,yrep+410);
SaveExport.DrawOutline(CouleurLigne);
}
////////////////////////////////////////////////////////////////////////////////
if(enable_import==1)
{
ol::Rect LoadExport(ol::Vec2D(xrep+140,yrep+390),ol::Vec2D(70,30));
LoadExport.SetRoundness(7.5);
if(window_focus_id==W_SAVE && mouse_x>xrep+140 && mouse_x<xrep+210 && mouse_y>yrep+390 && mouse_y<yrep+420)
{
LoadExport.Draw(CouleurSurvol);
}
petitchiffre.Print("LOAD",xrep+155,yrep+410);
LoadExport.DrawOutline(CouleurLigne);
}
return(0);
}
Ejemplo n.º 7
0
HTMLEventStatus WebEditBox::Event (HTMLEvent *e)
{
    WEBC_DEBUG_ReceiveEvent(this, e);
	switch (e->type)
	{
#if (WEBC_SUPPORT_TOUCHSCREEN)
		case HTML_EVENT_MOUSEDOWN:
			if (!(mFlags & DISPLAY_FLAG_DISABLED))
			{
				PopUpKeyPad((HTMLBrowser *)webc_GetBrowserWithFocus(), this->miNumLines, (void *) this, GetText(), EditBoxKeyboardcloseFn);
				return (HTML_EVENT_STATUS_DONE);
			}

//		case HTML_EVENT_MOUSEDOWN:
//		GetText();
#endif
		case HTML_EVENT_KEYDOWN:
			if (!(mFlags & DISPLAY_FLAG_DISABLED))
			{
				switch (e->data.key)
				{
					case WGK_PGUP:
					case WGK_PGDN:
					case WGK_HOME:
					case WGK_END:
					case WGK_LNUP:
					case WGK_LNDN:
					{
						WEBC_BOOL selecting = 0;
						if (e->flags & HTML_EVENT_FLAG_SHIFT_DOWN)
						{
							selecting = 1;
							BeginSelect();
						}
						switch (e->data.key)
						{
							case WGK_PGUP:
								break;

							case WGK_PGDN:
								break;

							case WGK_HOME:
								if (e->flags & HTML_EVENT_FLAG_CTRL_DOWN)
								{
									Home();
								}
								else
								{
									LineHome();
								}
								break;

							case WGK_END:
								if (e->flags & HTML_EVENT_FLAG_CTRL_DOWN)
								{
									End();
								}
								else
								{
									LineEnd();
								}
								break;

							case WGK_LNUP:
								LineUp();
								break;

							case WGK_LNDN:
								LineDown();
								break;
						}
						if (selecting)
						{
							EndSelect();
						}
						break;
					}

					case WGK_ESC:
						SelectAll();
						break;

					case WGK_CR:
						InsertChar((WebChar) '\n');
						break;

					default:
						WebEditString::Event(e);
						break;
				}
			}
			break;

		default:
			WebEditString::Event(e);
			break;
	}

	return (HTML_EVENT_STATUS_CONTINUE);
}
Ejemplo n.º 8
0
int fenetre_audio(int xb,int yb)
{

Rect audio_backg(Vec2D(xb,yb), Vec2D( 600,150+(index_nbre_players_visibles*120)));
audio_backg.SetRoundness(15);
audio_backg.Draw(CouleurFond);
audio_backg.SetLineWidth(triple_epaisseur_ligne_fader);
if(window_focus_id==919)
{
audio_backg.DrawOutline(CouleurFader);
}
else
{
audio_backg.DrawOutline(CouleurLigne);
}

neuro.Print( "AudioPlayers",(xb+80), (yb+30));

//FOLDER
Rect AudioFolderis(Vec2D(xb+350,yb+10),Vec2D(240,30));
AudioFolderis.SetRoundness(7.5);
AudioFolderis.Draw(CouleurSurvol);
neuromoyen.Print(audio_folder,xb+365,yb+25);


//////////////////////LISTE sons///////////////////////////////////////

Rect BackDeroule(Vec2D(xb+350,yb+45),Vec2D(240,(index_nbre_players_visibles*120)));
BackDeroule.SetRoundness(15);
BackDeroule.Draw(CouleurConfig.WithAlpha(0.7));
bool ind=0;

for (int y=1;y<(index_nbre_players_visibles*6);y++)
{
Rect OverAudioFile(Vec2D(xb+355,(yb+33+(y*20))),Vec2D(200,18));
OverAudioFile.SetRoundness(7.5);

OverAudioFile.Draw(CouleurFond.WithAlpha(0.5*ind));
ind=toggle(ind);
//affichage qui est selectionné
if(strcmp(audiofile_name,list_audio_files[audiofile_selected])==0 && (audiofile_selected==(y+line_audio)) )
{OverAudioFile.Draw(CouleurBlind);}

if(window_focus_id==919 && mouse_x>xb+355 && mouse_x<xb+505 && mouse_y>(yb+33+(y*20)) && mouse_y<(yb+48+(y*20)))
{
OverAudioFile.DrawOutline(CouleurLigne);
}


petitpetitchiffre.Print(ol::ToString(line_audio+y),xb+360,yb+45+(y*20));
Canvas::SetClipping( xb+355,yb+35+(y*20),230,20);
petitpetitchiffre.Print(list_audio_files[line_audio+y],xb+375,yb+45+(y*20));
Canvas::DisableClipping();
}

//////////////////UP DOWN LINE IMPORT/////////////////////
Circle LineUp(Vec2D(xb+570,yb+65),12);
LineUp.Draw(CouleurFond);
Circle LineDown(Vec2D(xb+570,yb+(index_nbre_players_visibles*120)),12);
LineDown.Draw(CouleurFond);


petitchiffre.Print("-",xb+566,yb+70);
petitchiffre.Print("+",xb+566,yb+(index_nbre_players_visibles*120)+5);
LineUp.DrawOutline(CouleurLigne);
LineDown.DrawOutline(CouleurLigne);

//RESCAN FOLDER
    Rect AudioRescanDriver( Vec2D(xb+230,yb+10), Vec2D ( 50,20));
    AudioRescanDriver.SetRoundness(7.5);
    AudioRescanDriver.DrawOutline(CouleurLigne);

////////////////////////////////////////////////////////////////////////////////
//EDIT ON OFF
   Rect EditSound( Vec2D(xb+230,yb+40), Vec2D ( 50,20));
    EditSound.SetRoundness(7.5);
    if(index_edit_audio==1){EditSound.Draw(CouleurFader);}
    EditSound.DrawOutline(CouleurLigne);
    petitpetitchiffre.Print("EDIT",xb+240,yb+53);


//////LES LECTEURS//////////////////////////////////////////////////////////////
for(int lop=0;lop<index_nbre_players_visibles;lop++)
{
lecteur_audio(xb+5,yb+70+(lop*140),lop);
}

//////L AFFECTATION AUX FADERS//////////////////////////////////////////////////
//Rect AffectA(Vec2D(xb+440,yb+450),Vec2D(140,20));
Rect AffectA(Vec2D(xb+440,yb+55+(index_nbre_players_visibles*120)),Vec2D(140,20));
AffectA.SetRoundness(5);
AffectA.Draw(CouleurFader.WithAlpha(index_affect_audio_to_dock));
AffectA.DrawOutline(CouleurLigne);
petitchiffre.Print("AFFECT TO DOCK",xb+460,yb+70+(index_nbre_players_visibles*120));

petitchiffre.Print("Volume",xb+400,yb+100+(index_nbre_players_visibles*120));
petitchiffre.Print("Pan",xb+400,yb+120+(index_nbre_players_visibles*120));
petitchiffre.Print("Pitch",xb+400,yb+140+(index_nbre_players_visibles*120));

for(int pl=0;pl<index_nbre_players_visibles;pl++)
{
for (int co=0;co<3;co++)
{
 Rect AffectAudioType(Vec2D(xb+460+(pl*30),yb+90+(index_nbre_players_visibles*120)+(co*20)),Vec2D(20,15));
 AffectAudioType.SetRoundness(3);
 if(player_to_affect_to_dock==pl && audio_type_for_dock_affectation_is==co){AffectAudioType.Draw(CouleurFader);}
 AffectAudioType.DrawOutline(CouleurLigne);
}
 petitpetitchiffre.Print(ol::ToString((pl+1)),xb+467+(pl*30),yb+85+(index_nbre_players_visibles*120));
}


if(window_focus_id==919  )
{
if(mouse_x>xb+350 && mouse_x<xb+590 && mouse_y>yb+10 && mouse_y<yb+40)
{
AudioFolderis.DrawOutline(CouleurLigne);
}
else if( mouse_x>xb+230 && mouse_x<xb+280 && mouse_y>yb+10 && mouse_y<yb+30 )
    {
    AudioRescanDriver.Draw(CouleurSurvol);
    }
else if( mouse_x>xb+558 && mouse_x<xb+582  )
{
if(mouse_y>yb+53 && mouse_y<yb+72)
{
LineUp.Draw(CouleurSurvol);
}
if(mouse_y>yb+(index_nbre_players_visibles*120)-7 && mouse_y<yb+(index_nbre_players_visibles*120)+5)
{
LineDown.Draw(CouleurSurvol);
}
}
}


petitpetitchiffre.Print("rescan!",xb+235,yb+23);
return(0);
}
Ejemplo n.º 9
0
	void CContainerUI::DoEvent(TEventUI& event)
	{
		if( !IsMouseEnabled() && event.Type > UIEVENT__MOUSEBEGIN && event.Type < UIEVENT__MOUSEEND ) {
			if( m_pParent != NULL ) m_pParent->DoEvent(event);
			else CControlUI::DoEvent(event);
			return;
		}

		if( event.Type == UIEVENT_SETFOCUS ) 
		{
			m_bFocused = true;
			return;
		}
		if( event.Type == UIEVENT_KILLFOCUS ) 
		{
			m_bFocused = false;
			return;
		}
		if( m_pVerticalScrollBar != NULL && m_pVerticalScrollBar->IsVisible() && m_pVerticalScrollBar->IsEnabled() )
		{
			if( event.Type == UIEVENT_KEYDOWN ) 
			{
				switch( event.chKey ) {
				case VK_DOWN:
					LineDown();
					return;
				case VK_UP:
					LineUp();
					return;
				case VK_NEXT:
					PageDown();
					return;
				case VK_PRIOR:
					PageUp();
					return;
				case VK_HOME:
					HomeUp();
					return;
				case VK_END:
					EndDown();
					return;
				}
			}
			else if( event.Type == UIEVENT_SCROLLWHEEL )
			{
				switch( LOWORD(event.wParam) ) {
				case SB_LINEUP:
					LineUp();
					return;
				case SB_LINEDOWN:
					LineDown();
					return;
				}
			}
		}
		if( m_pHorizontalScrollBar != NULL && m_pHorizontalScrollBar->IsVisible() && m_pHorizontalScrollBar->IsEnabled() ) {
			if( event.Type == UIEVENT_KEYDOWN ) 
			{
				switch( event.chKey ) {
				case VK_DOWN:
					LineRight();
					return;
				case VK_UP:
					LineLeft();
					return;
				case VK_NEXT:
					PageRight();
					return;
				case VK_PRIOR:
					PageLeft();
					return;
				case VK_HOME:
					HomeLeft();
					return;
				case VK_END:
					EndRight();
					return;
				}
			}
			else if( event.Type == UIEVENT_SCROLLWHEEL )
			{
				switch( LOWORD(event.wParam) ) {
				case SB_LINEUP:
					LineLeft();
					return;
				case SB_LINEDOWN:
					LineRight();
					return;
				}
			}
		}
		CControlUI::DoEvent(event);
	}
int do_arduino_config(int cfg_X, int cfg_Y)
{
//port COM
petitchiffre.Print("DEVICE ON COM:",cfg_X+20,cfg_Y+45); 
Rect Comport(Vec2D(cfg_X+120,cfg_Y+30),Vec2D(50,25));
Comport.SetRoundness(rondeur_fader/2);
Comport.SetLineWidth(epaisseur_ligne_fader);  
Comport.Draw(CouleurFond.WithAlpha(0.5));
if(mouse_x>cfg_X+120 && mouse_x<cfg_X+120+50 && mouse_y>cfg_Y+30 && mouse_y<cfg_Y+30+25)
{
Comport.DrawOutline(CouleurLevel);
if(mouse_button==1 && mouse_released==0)
{
Comport.Draw(CouleurBlind);
int new_comport=atoi(numeric);
reset_numeric_entry();
if(  new_comport>0 && new_comport<18)
{
if(arduino_device_0_is_ignited==1){arduino_close(0);}
arduino_com0=new_comport;           
arduino_init(0);      
mouse_released=1; 
}                   
}                     
}
petitchiffre.Print(ol::ToString(arduino_com0),cfg_X+140,cfg_Y+45);

//BAUD RATE
petitchiffre.Print("BAUD-RATE:",cfg_X+20,cfg_Y+75); 
Rect BaudrateB(Vec2D(cfg_X+120,cfg_Y+60),Vec2D(50,25));
BaudrateB.SetRoundness(rondeur_fader/2);
BaudrateB.SetLineWidth(epaisseur_ligne_fader);  
BaudrateB.Draw(CouleurFond.WithAlpha(0.5));
if(mouse_x>cfg_X+120 && mouse_x<cfg_X+120+50 && mouse_y>cfg_Y+60 && mouse_y<cfg_Y+60+25)
{
BaudrateB.DrawOutline(CouleurLevel);
if(mouse_button==1 && mouse_released==0)
{
BaudrateB.Draw(CouleurBlind);
int new_Baudrate=atoi(numeric);
reset_numeric_entry();
if( new_Baudrate>0 && (new_Baudrate ==300 || new_Baudrate==1200 || new_Baudrate==2400 || new_Baudrate==4800 || new_Baudrate==9600 || 
new_Baudrate==14400 || new_Baudrate==19200 || new_Baudrate==28800 || new_Baudrate==38400 || new_Baudrate==57600 || new_Baudrate==115200))
{
if(arduino_device_0_is_ignited==1){arduino_close(0);}
arduino_baud_rate0=new_Baudrate;           
arduino_init(0);      
mouse_released=1; 
}                   
}                     
}
petitchiffre.Print(ol::ToString(arduino_baud_rate0),cfg_X+128,cfg_Y+75);

//REQUEST RATE
petitchiffre.Print("REQUEST-RATE:",cfg_X+20,cfg_Y+105); 
Rect ReqrateB(Vec2D(cfg_X+120,cfg_Y+90),Vec2D(50,25));
ReqrateB.SetRoundness(rondeur_fader/2);
ReqrateB.SetLineWidth(epaisseur_ligne_fader);  
ReqrateB.Draw(CouleurFond.WithAlpha(0.5));
if(mouse_x>cfg_X+120 && mouse_x<cfg_X+120+50 && mouse_y>cfg_Y+90 && mouse_y<cfg_Y+90+25)
{
ReqrateB.DrawOutline(CouleurLevel);
if(mouse_button==1 && mouse_released==0)
{
ReqrateB.Draw(CouleurBlind);
int new_Reqrate=atoi(numeric);
reset_numeric_entry();
if( new_Reqrate>0 && new_Reqrate<=100 )
{
ARDUINO_RATE=new_Reqrate;
install_int_ex(ticker_arduino ,BPS_TO_TIMER(ARDUINO_RATE));         
mouse_released=1; 
}                   
}                     
}
petitchiffre.Print(ol::ToString(ARDUINO_RATE),cfg_X+140,cfg_Y+105);

////////////////LIMITATION DE CARTES ///////////////////////////////////////////
petitchiffre.Print("LAST I/O:",cfg_X+20,cfg_Y+135); 
Rect MaxIOB(Vec2D(cfg_X+120,cfg_Y+120),Vec2D(50,25));
MaxIOB.SetRoundness(rondeur_fader/2);
MaxIOB.SetLineWidth(epaisseur_ligne_fader);  
MaxIOB.Draw(CouleurFond.WithAlpha(0.5));
if(mouse_x>cfg_X+120 && mouse_x<cfg_X+120+50 && mouse_y>cfg_Y+120 && mouse_y<cfg_Y+120+25)
{
MaxIOB.DrawOutline(CouleurLevel);
if(mouse_button==1 && mouse_released==0)
{
MaxIOB.Draw(CouleurBlind);
int new_maxio=atoi(numeric);
reset_numeric_entry();
if( new_maxio>=0 && new_maxio<=digital_limit )
{
arduino_max_digital=new_maxio;
mouse_released=1; 
}                   
}                     
}
petitchiffre.Print(ol::ToString(arduino_max_digital),cfg_X+140,cfg_Y+135);
///////////////////////////////
petitchiffre.Print("LAST ANALOG:",cfg_X+20,cfg_Y+165); 
Rect MaxAnB(Vec2D(cfg_X+120,cfg_Y+150),Vec2D(50,25));
MaxAnB.SetRoundness(rondeur_fader/2);
MaxAnB.SetLineWidth(epaisseur_ligne_fader);  
MaxAnB.Draw(CouleurFond.WithAlpha(0.5));
if(mouse_x>cfg_X+120 && mouse_x<cfg_X+120+50 && mouse_y>cfg_Y+150 && mouse_y<cfg_Y+150+25)
{
MaxAnB.DrawOutline(CouleurLevel);
if(mouse_button==1 && mouse_released==0)
{
MaxAnB.Draw(CouleurBlind);
int new_maxan=atoi(numeric);
reset_numeric_entry();
if( new_maxan>=0 && new_maxan<=analog_limit )
{
arduino_max_analog=new_maxan;
mouse_released=1; 
}                   
}                     
}
petitchiffre.Print(ol::ToString(arduino_max_analog),cfg_X+140,cfg_Y+165);
/////////////////////////////////
petitchiffre.Print("OPEN:",cfg_X+20,cfg_Y+195); 
Rect OpenB(Vec2D(cfg_X+120,cfg_Y+180),Vec2D(50,25));
OpenB.SetRoundness(rondeur_fader/2);
OpenB.SetLineWidth(epaisseur_ligne_fader);  
OpenB.Draw(CouleurFond.WithAlpha(0.5));
switch (arduino_device_0_is_ignited)
{
case 0:
petitchiffre.Print("is OFF",cfg_X+130,cfg_Y+195);      
break;
case 1:
petitchiffre.Print("is ON",cfg_X+130,cfg_Y+195);      
break;       
}
if(mouse_x>cfg_X+120 && mouse_x<cfg_X+120+50 && mouse_y>cfg_Y+180 && mouse_y<cfg_Y+180+25)
{
OpenB.DrawOutline(CouleurLevel);
if(mouse_button==1 && mouse_released==0)
{
OpenB.Draw(CouleurBlind);
switch (arduino_device_0_is_ignited)
{
case 0:
   arduino_init(0);   
break;
case 1:
   arduino_close(0); 
   arduino_device_0_is_ignited=0;    
break;       
}
mouse_released=1; 
}                     
}
///////////////////////////////////////////////////////////

petitchiffre.Print("Digital affectation:",cfg_X+200,cfg_Y+20);
petitchiffre.Print("Analog affectation:",cfg_X+510,cfg_Y+20);
///////////////////BOX AFFECTATION DIGITAL////////////////

char string_temp_def[25];
char string_temp_familly[25];



for (int y=0;y<12;y++)
{
////////DIG/////////////////////////////////////////////////////////////////
Rect OverTyp(Vec2D(cfg_X+200+5,(cfg_Y+40+(y*20)-10)),Vec2D(70,18));
OverTyp.SetRoundness(rondeur_fader/2);
OverTyp.Draw(CouleurFond.WithAlpha(0.3));

Rect OverAction(Vec2D(cfg_X+280+5,(cfg_Y+40+(y*20)-10)),Vec2D(140,18));
OverAction.SetRoundness(rondeur_fader/2);
OverAction.Draw(CouleurFond.WithAlpha(0.3));

Rect OverVal(Vec2D(cfg_X+430+5,(cfg_Y+40+(y*20)-10)),Vec2D(30,18));
OverVal.SetRoundness(rondeur_fader/2);
OverVal.Draw(CouleurFond.WithAlpha(0.3));
/////////ANA///////////////////////////////////////////////////////////////

Rect OverAff(Vec2D(cfg_X+520+5,(cfg_Y+40+(y*20)-10)),Vec2D(105,18));
OverAff.SetRoundness(rondeur_fader/2);
OverAff.Draw(CouleurFond.WithAlpha(0.3));

Rect OverValA(Vec2D(cfg_X+630+5,(cfg_Y+40+(y*20)-10)),Vec2D(30,18));
OverValA.SetRoundness(rondeur_fader/2);
OverValA.Draw(CouleurFond.WithAlpha(0.3));


if(mouse_y>(cfg_Y+40+(y*20)-10) && mouse_y<(cfg_Y+40+(y*20)+5))
{
////////////////////DIG//////////////////////////////////////////////////////////
//changement type
if(mouse_x>cfg_X+200+5 && mouse_x<cfg_X+200+5+70)
{
OverTyp.DrawOutline(CouleurLigne);                  
if(mouse_button==1 && mouse_released==0)
{
arduino_digital_type[position_line_io+y]++;
arduino_digital_function_input[position_line_io+y][1]=0;
arduino_digital_function_input[position_line_io+y][0]=0;
arduino_digital_function_output[position_line_io+y][1]=0;
arduino_digital_function_output[position_line_io+y][0]=0;
if(arduino_digital_type[position_line_io+y]>3)
{arduino_digital_type[position_line_io+y]=0;}
OverTyp.Draw(CouleurFader);    
mouse_released=1;               
}
}
//////L'ASSIGNATION INPUT/////////////////////////////////////////////
//arduino_digital_function_input[128][2];//action // Val 1 

if(mouse_x>cfg_X+280+5 && mouse_x<cfg_X+280+5+140)//famille d action
{
OverAction.DrawOutline(CouleurLigne);                  
if(mouse_button==1 && mouse_released==0)
{
if(arduino_digital_type[position_line_io+y]==1)//input
{
arduino_digital_function_input[position_line_io+y][0]++;
if(arduino_digital_function_input[position_line_io+y][0]>33)
{arduino_digital_function_input[position_line_io+y][0]=0;}
arduino_digital_function_input[position_line_io+y][1]=0;
}
if(arduino_digital_type[position_line_io+y]==2 || arduino_digital_type[position_line_io+y]==3)//output ON OF ET PWM
{
arduino_digital_function_output[position_line_io+y][0]++;
if(arduino_digital_function_output[position_line_io+y][0]>2)
{arduino_digital_function_output[position_line_io+y][0]=0;}
arduino_digital_function_output[position_line_io+y][1]=0;
}
OverAction.Draw(CouleurFader);    
mouse_released=1;               
}
}           


///////La valeur de l'ordre si il y en a une ( par ex. num fader)///////

if(mouse_x>cfg_X+430+5 && mouse_x<cfg_X+430+5+30)//famille d action
{
OverVal.DrawOutline(CouleurLigne);                  
if(mouse_button==1 && mouse_released==0)
{
int valois=atoi(numeric);

///INPUT/////////////////////////////////////////////////////////////////////
//data Val1 range pour un input de type fader ( 0 à 11 )
if(
arduino_digital_type[position_line_io+y]==1
&& arduino_digital_function_input[position_line_io+y][0]>=0 && arduino_digital_function_input[position_line_io+y][0]<=11 
&& valois>0 && valois<=48
)
{
arduino_digital_function_input[position_line_io+y][1]=valois;                                                            
}
//faire data range pour le picth: 0 à 127
if(
arduino_digital_type[position_line_io+y]==1
&& ( arduino_digital_function_input[position_line_io+y][0]>=17 || arduino_digital_function_input[position_line_io+y][0]<=32) 
&& valois>=0 && valois<=127
)
{
arduino_digital_function_input[position_line_io+y][1]=valois;                                                            
}
///////////OUTPUT ON OFF ET PWM///////////////////////////////////////////////////////////////
if((arduino_digital_type[position_line_io+y]==2 || arduino_digital_type[position_line_io+y]==3) && arduino_digital_function_output[position_line_io+y][0]==1
&& valois>0 && valois<513)//CHANNEL
{
arduino_digital_function_output[position_line_io+y][1]=valois;                                                 
}
if((arduino_digital_type[position_line_io+y]==2 || arduino_digital_type[position_line_io+y]==3) && arduino_digital_function_output[position_line_io+y][0]==2
&& valois>0 && valois<49)//Fader
{
arduino_digital_function_output[position_line_io+y][1]=valois;                                                 
}
reset_numeric_entry();
OverVal.Draw(CouleurFader);    
mouse_released=1;               
}
}
///////////////////////////////////////          
///////////////////BOX AFFECTATION ANALOG////////////////


//////L'ASSIGNATION Analog/////////////////////////////////////////////

//changement affectation
if(mouse_x>cfg_X+520+5 && mouse_x<cfg_X+520+5+105)
{
OverAff.DrawOutline(CouleurLigne);                  
if(mouse_button==1 && mouse_released==0)
{
arduino_analog_function_input[position_line_ana+y]++;
arduino_analog_attribution_input[position_line_ana+y]=0;
if(arduino_analog_function_input[position_line_ana+y]>20)
{arduino_analog_function_input[position_line_ana+y]=0;}
OverAff.Draw(CouleurFader);    
mouse_released=1;               
}
}
///////////////LA VALEUR/////////////////////////////
if(mouse_x>cfg_X+630+5 && mouse_x<cfg_X+630+5+30)//valeur
{
OverValA.DrawOutline(CouleurLigne);                  
if(mouse_button==1 && mouse_released==0)
{
int valana=0;
valana=atoi(numeric);
reset_numeric_entry();
/////////////INPUT
//limitation des valeurs aux types d entrees
if(arduino_analog_function_input[position_line_ana+y]==1 || arduino_analog_function_input[position_line_ana+y]==2)//faders level et speed
{
 if(valana>0 && valana<=48)
 {arduino_analog_attribution_input[position_line_ana+y]=valana-1;}
}
if(  arduino_analog_function_input[position_line_ana+y]==4)//seq scene et preset
{
 if(valana>0 && valana<=3)//1 stage 2 preset 3 speed
 {arduino_analog_attribution_input[position_line_ana+y]=valana-1;}
}
if(  arduino_analog_function_input[position_line_ana+y]>=5 &&  arduino_analog_function_input[position_line_ana+y]<=20 )//simulation midi
{
 if(valana>=0 && valana<=127)//Pitch
 {arduino_analog_attribution_input[position_line_ana+y]=valana;}
}



OverValA.Draw(CouleurFader);   
mouse_released=1;               
}
}           






/////////////////////////////////////////////////////////////////////////////// 
}
//////////////////AFFICHAGE///////////////////////////////

if(position_line_io+y==0)
{
sprintf(string_temp_def,"0: Serial",position_line_io+y);                          
sprintf(string_temp_familly,"Rx");
OverTyp.Draw(CouleurFond);
petitchiffre.Print(string_temp_familly,cfg_X+280+13,cfg_Y+43+(y*20));  
petitchiffre.Print(string_temp_def,cfg_X+200+15,cfg_Y+43+(y*20));  
petitchiffrerouge.Print(ol::ToString(digital_data_from_arduino[position_line_io+y]),cfg_X+475,cfg_Y+43+(y*20));    
}
if(position_line_io+y==1)
{
sprintf(string_temp_def,"1: Serial",position_line_io+y);
sprintf(string_temp_familly,"Tx");  
OverTyp.Draw(CouleurFond);  
petitchiffre.Print(string_temp_familly,cfg_X+280+13,cfg_Y+43+(y*20));  
petitchiffre.Print(string_temp_def,cfg_X+200+15,cfg_Y+43+(y*20));  
petitchiffrerouge.Print(ol::ToString(digital_data_from_arduino[position_line_io+y]),cfg_X+475,cfg_Y+43+(y*20));                        
}

if(position_line_io+y>1 && position_line_io+y<=arduino_max_digital)
{
///////LE TYPE ////////////////////////////////////////////
switch(arduino_digital_type[position_line_io+y])
{
case 0://desafected
sprintf(string_temp_def,"%d: -",position_line_io+y);
break;
case 1://input      
sprintf(string_temp_def,"%d: Input",position_line_io+y);
OverTyp.Draw(CouleurRed);  
break;
case 2://output
sprintf(string_temp_def,"%d: Output",position_line_io+y);
OverTyp.Draw(CouleurGreen);  
break;
case 3://pwm
sprintf(string_temp_def,"%d: PWM",position_line_io+y);
OverTyp.Draw(CouleurYellow);  
break;      
default:
break;                                        
}      
                             
////////////ACTIONS /////////////////////////////////////////////////
////////////////GRANDE FAMILLE INPUT////////////////////////////////////////
if(arduino_digital_type[position_line_io+y]==1)//si de la famille des inputs
{
switch(arduino_digital_function_input[position_line_io+y][0])
{
case 0://desafected
sprintf(string_temp_familly,"-");
break;
case 1: //fader up                                                
sprintf(string_temp_familly,"Fader: UP");
break;
case 2://fader down
sprintf(string_temp_familly,"Fader: DOWN");
break;
case 3://Fader saw
sprintf(string_temp_familly,"Fader: SAW");
break;      
case 4:
sprintf(string_temp_familly,"Fader: ToPREVDock");     
break;
case 5:
sprintf(string_temp_familly,"Fader: ToNEXTDock");     
break;
case 6:
sprintf(string_temp_familly,"Fader: Up/Down");
break;
case 7:
sprintf(string_temp_familly,"Fader: LOCK");
break;
case 8:
sprintf(string_temp_familly,"Fader: FLASH");
break;
case 9:
sprintf(string_temp_familly,"Fader: All at 0");
break;
case 10:
sprintf(string_temp_familly,"Fader: L/Unloop dock");
break;
case 11:
sprintf(string_temp_familly,"Fader: L/Unloop all");
break;
case 12:
sprintf(string_temp_familly,"Seq: GO");
break;
case 13:
sprintf(string_temp_familly,"Seq: GO BACK");
break;
case 14:
sprintf(string_temp_familly,"Seq: JUMP");
break;
case 15:
sprintf(string_temp_familly,"Seq: SHIFT-W");
break;
case 16:
sprintf(string_temp_familly,"Seq: SHIFT-X");
break;
case 17:
sprintf(string_temp_familly,"Bang Banger num");
break;
case 18:
sprintf(string_temp_familly,"As Key-On CH0 Pitch:");
break;
case 19:
sprintf(string_temp_familly,"As Key-On CH1 Pitch:");
break;
case 20:
sprintf(string_temp_familly,"As Key-On CH2 Pitch:");
break;
case 21:
sprintf(string_temp_familly,"As Key-On CH3 Pitch:");
break;
case 22:
sprintf(string_temp_familly,"As Key-On CH4 Pitch:");
break;
case 23:
sprintf(string_temp_familly,"As Key-On CH5 Pitch:");
break;
case 24:
sprintf(string_temp_familly,"As Key-On CH6 Pitch:");
break;
case 25:
sprintf(string_temp_familly,"As Key-On CH7 Pitch:");
break;
case 26:
sprintf(string_temp_familly,"As Key-On CH8 Pitch:");
break;
case 27:
sprintf(string_temp_familly,"As Key-On CH9 Pitch:");
break;
case 28:
sprintf(string_temp_familly,"As Key-On CH10 Pitch:");
break;
case 29:
sprintf(string_temp_familly,"As Key-On CH11 Pitch:");
break;
case 30:
sprintf(string_temp_familly,"As Key-On CH12 Pitch:");
break;
case 31:
sprintf(string_temp_familly,"As Key-On CH13 Pitch:");
break;
case 32:
sprintf(string_temp_familly,"As Key-On CH14 Pitch:");
break;
case 33:
sprintf(string_temp_familly,"As Key-On CH15 Pitch:");
break;
default:
break;                                        
} 
petitchiffre.Print(string_temp_familly,cfg_X+280+13,cfg_Y+43+(y*20));  
petitchiffre.Print(ol::ToString(arduino_digital_function_input[position_line_io+y][1]),cfg_X+440+3,cfg_Y+43+(y*20)); 
}
petitchiffrerouge.Print(ol::ToString(digital_data_from_arduino[position_line_io+y]),cfg_X+475,cfg_Y+43+(y*20));  
petitchiffre.Print(string_temp_def,cfg_X+200+15,cfg_Y+43+(y*20));     
}

if(arduino_digital_type[position_line_io+y]==2)//si de la famille des Outputs
{
switch(arduino_digital_function_output[position_line_io+y][0])
{
case 0://desafected
sprintf(string_temp_familly,"-");
break;
case 1: //relié à un circuit  
sprintf(string_temp_familly,"Channel >10");            
break;
case 2://relié à un fader
sprintf(string_temp_familly,"Fader >10");
break;
}
petitchiffre.Print(string_temp_familly,cfg_X+280+13,cfg_Y+43+(y*20));  
petitchiffre.Print(ol::ToString(arduino_digital_function_output[position_line_io+y][1]),cfg_X+440+3,cfg_Y+43+(y*20)); 

}
if(arduino_digital_type[position_line_io+y]==3)//si de la famille pwm
{
switch(arduino_digital_function_output[position_line_io+y][0])
{
case 0://desafected
sprintf(string_temp_familly,"-");
break;
case 1: //relié à un circuit  
sprintf(string_temp_familly,"Channel");            
break;
case 2://relié à un fader
sprintf(string_temp_familly,"Fader");
break;
}
petitchiffre.Print(string_temp_familly,cfg_X+280+13,cfg_Y+43+(y*20));  
petitchiffre.Print(ol::ToString(arduino_digital_function_output[position_line_io+y][1]),cfg_X+440+3,cfg_Y+43+(y*20)); 
}


//affichage analog
if(position_line_ana+y<=arduino_max_analog)
{
sprintf(string_temp_def,"%d:",position_line_ana+y);
petitchiffre.Print(string_temp_def,cfg_X+510,cfg_Y+43+(y*20)); 
switch(arduino_analog_function_input[position_line_ana+y])
{
case 0://desafected
sprintf(string_temp_familly,"-");
break;
case 1: //faders  lvl                                           
sprintf(string_temp_familly,"Fader Level:");
petitchiffre.Print(ol::ToString((arduino_analog_attribution_input[position_line_ana+y]+1)),cfg_X+645,cfg_Y+43+(y*20));     
break;
case 2://faders speeed
sprintf(string_temp_familly,"Fader Speed:");
petitchiffre.Print(ol::ToString(arduino_analog_attribution_input[position_line_ana+y]+1),cfg_X+645,cfg_Y+43+(y*20)); 
break;
case 3://master
sprintf(string_temp_familly,"Grand Master");
break;      
case 4://seq scene et preset et vitesse
sprintf(string_temp_familly,"Sequence:");
petitchiffre.Print(ol::ToString(arduino_analog_attribution_input[position_line_ana+y]+1),cfg_X+645,cfg_Y+43+(y*20)); 
break;
case 5://Midi CH0
sprintf(string_temp_familly,"As CC CH0 Pitch:");
petitchiffre.Print(ol::ToString(arduino_analog_attribution_input[position_line_ana+y]),cfg_X+645,cfg_Y+43+(y*20)); 
break;
case 6://Midi CH1
sprintf(string_temp_familly,"As CC CH1 Pitch:");
petitchiffre.Print(ol::ToString(arduino_analog_attribution_input[position_line_ana+y]),cfg_X+645,cfg_Y+43+(y*20)); 
break;
case 7://Midi CH2
sprintf(string_temp_familly,"As CC CH2 Pitch:");
petitchiffre.Print(ol::ToString(arduino_analog_attribution_input[position_line_ana+y]),cfg_X+645,cfg_Y+43+(y*20)); 
break;
case 8://Midi CH3
sprintf(string_temp_familly,"As CC CH3 Pitch:");
petitchiffre.Print(ol::ToString(arduino_analog_attribution_input[position_line_ana+y]),cfg_X+645,cfg_Y+43+(y*20)); 
break;
case 9://Midi CH4
sprintf(string_temp_familly,"As CC CH4 Pitch:");
petitchiffre.Print(ol::ToString(arduino_analog_attribution_input[position_line_ana+y]),cfg_X+645,cfg_Y+43+(y*20)); 
break;
case 10://Midi CH5
sprintf(string_temp_familly,"As CC CH5 Pitch:");
petitchiffre.Print(ol::ToString(arduino_analog_attribution_input[position_line_ana+y]),cfg_X+645,cfg_Y+43+(y*20)); 
break;
case 11://Midi CH6
sprintf(string_temp_familly,"As CC CH6 Picth:");
petitchiffre.Print(ol::ToString(arduino_analog_attribution_input[position_line_ana+y]),cfg_X+645,cfg_Y+43+(y*20)); 
break;
case 12://Midi CH7
sprintf(string_temp_familly,"As CC CH7 Pitch:");
petitchiffre.Print(ol::ToString(arduino_analog_attribution_input[position_line_ana+y]),cfg_X+645,cfg_Y+43+(y*20)); 
break;
case 13://Midi CH8
sprintf(string_temp_familly,"As CC CH8 Pitch:");
petitchiffre.Print(ol::ToString(arduino_analog_attribution_input[position_line_ana+y]),cfg_X+645,cfg_Y+43+(y*20)); 
break;
case 14://Midi CH9
sprintf(string_temp_familly,"As CC CH9 Pitch:");
petitchiffre.Print(ol::ToString(arduino_analog_attribution_input[position_line_ana+y]),cfg_X+645,cfg_Y+43+(y*20)); 
break;
case 15://Midi CH10
sprintf(string_temp_familly,"As CC CH10 Picth:");
petitchiffre.Print(ol::ToString(arduino_analog_attribution_input[position_line_ana+y]),cfg_X+645,cfg_Y+43+(y*20)); 
break;
case 16://Midi CH11
sprintf(string_temp_familly,"As CC CH11 Pitch:");
petitchiffre.Print(ol::ToString(arduino_analog_attribution_input[position_line_ana+y]),cfg_X+645,cfg_Y+43+(y*20)); 
break;
case 17://Midi CH12
sprintf(string_temp_familly,"As CC CH12 Pitch:");
petitchiffre.Print(ol::ToString(arduino_analog_attribution_input[position_line_ana+y]),cfg_X+645,cfg_Y+43+(y*20)); 
break;
case 18://Midi CH13
sprintf(string_temp_familly,"As CC CH13 Pitch:");
petitchiffre.Print(ol::ToString(arduino_analog_attribution_input[position_line_ana+y]),cfg_X+645,cfg_Y+43+(y*20)); 
break;
case 19://Midi CH14
sprintf(string_temp_familly,"As CC CH14 Pitch:");
petitchiffre.Print(ol::ToString(arduino_analog_attribution_input[position_line_ana+y]),cfg_X+645,cfg_Y+43+(y*20)); 
break;
case 20://Midi CH15
sprintf(string_temp_familly,"As CC CH15 Pitch:");
petitchiffre.Print(ol::ToString(arduino_analog_attribution_input[position_line_ana+y]),cfg_X+645,cfg_Y+43+(y*20)); 
break;
default:
break;
}
petitchiffre.Print(string_temp_familly,cfg_X+515+15,cfg_Y+43+(y*20));     
petitchiffrerouge.Print(ol::ToString(analog_data_from_arduino[position_line_ana+y]),cfg_X+670+5,cfg_Y+43+(y*20));                                             
}

//fin boucle des 12 lignes
}
/////////////////UP DOWN LINE IO /////////////////////
Circle LineUp(Vec2D(cfg_X+200+200,cfg_Y+15),12);
LineUp.Draw(CouleurFond.WithAlpha(0.3));
Circle LineDown(Vec2D(cfg_X+200+240,cfg_Y+15),12);
LineDown.Draw(CouleurFond.WithAlpha(0.3));

if(mouse_y>cfg_Y+15-12 && mouse_y<cfg_Y+15+12)
{  
if(mouse_x>cfg_X+200+200-12 && mouse_x<cfg_X+200+200+12)
{                    
LineUp.Draw(CouleurSurvol);
if(mouse_button==1)
{
LineUp.Draw(CouleurFader);
if(position_line_io>0){position_line_io--;}
}                 
}
else if(mouse_x>cfg_X+200+240-12 && mouse_x<cfg_X+200+240+12)
{
LineDown.Draw(CouleurSurvol);
if(mouse_button==1)
{
LineDown.Draw(CouleurFader);
if(position_line_io<digital_limit-1){position_line_io++;}
}                  
}                                                
}
petitchiffre.Print("-",cfg_X+200+198,cfg_Y+19);
petitchiffre.Print("+",cfg_X+200+236,cfg_Y+19);
LineUp.DrawOutline(CouleurLigne.WithAlpha(0.6));
LineDown.DrawOutline(CouleurLigne.WithAlpha(0.6));

/////////////////UP DOWN ANA /////////////////////
Circle LineUpA(Vec2D(cfg_X+510+150,cfg_Y+15),12);
LineUpA.Draw(CouleurFond.WithAlpha(0.3));
Circle LineDownA(Vec2D(cfg_X+510+190,cfg_Y+15),12);
LineDownA.Draw(CouleurFond.WithAlpha(0.3));

if(mouse_y>cfg_Y+15-12 && mouse_y<cfg_Y+15+12)
{  
if(mouse_x>cfg_X+510+150-12 && mouse_x<cfg_X+510+150+12)
{                    
LineUpA.Draw(CouleurSurvol);
if(mouse_button==1)
{
LineUpA.Draw(CouleurFader);
if(position_line_ana>0){position_line_ana--;}
}                 
}
else if(mouse_x>cfg_X+510+190-12 && mouse_x<cfg_X+510+190+12)
{
LineDownA.Draw(CouleurSurvol);
if(mouse_button==1)
{
LineDownA.Draw(CouleurFader);
if(position_line_ana<analog_limit-1){position_line_ana++;}
}                  
}                                                
}
petitchiffre.Print("-",cfg_X+510+148,cfg_Y+19);
petitchiffre.Print("+",cfg_X+510+186,cfg_Y+19);
LineUpA.DrawOutline(CouleurLigne.WithAlpha(0.6));
LineDownA.DrawOutline(CouleurLigne.WithAlpha(0.6));



//FEEDBACK
petitpetitchiffre.Print("Bytes received:",cfg_X+10,cfg_Y+260);  
petitchiffre.Print(ol::ToString( nBytesReadArduino0),cfg_X+110,cfg_Y+260); 
petitpetitchiffre.Print("Last str. received:",cfg_X+10,cfg_Y+270);  
petitpetitchiffre.Print(tmp_str_arduino,cfg_X+110,cfg_Y+270);  
petitchiffrerouge.Print(string_Arduino_status,cfg_X+10,cfg_Y+285);
  

return(0);                              
}
Ejemplo n.º 11
0
void ScrollBar::LineRight()
{
    LineDown();
}
Ejemplo n.º 12
0
void ScrollBar::OnLineRight(suic::Element* pSender, suic::MouseEventArg& e)
{
    LineDown();
}
Ejemplo n.º 13
0
void Board::Drop ()
{
	while(!finished)
		LineDown ();
}
int HelpWindow(int xhelp, int yhelp)
{

Rect BackHelp(Vec2D(xhelp,yhelp),Vec2D(700,300));
BackHelp.SetRoundness(rondeur_fader/2);
BackHelp.SetLineWidth(epaisseur_ligne_fader*3);
BackHelp.Draw(CouleurFond);
BackHelp.Draw(CouleurBleuProcedure.WithAlpha(0.5));
if(window_focus_id==W_HELP){
BackHelp.DrawOutline(CouleurFader);
}
else {BackHelp.DrawOutline(CouleurLigne);}

neuro.Print("HELP",xhelp+100, yhelp+30);
petitchiffre.Print("SITE:      http://www.le-chat-noir-numerique.fr",xhelp+190, yhelp+10);
petitchiffre.Print("WIKI:      http://www.le-chat-noir-numerique.fr/whitecat/dokuwiki/",xhelp+190, yhelp+25);
petitchiffre.Print("FORUM:     http://www.le-chat-noir-numerique.fr/forums/",xhelp+190, yhelp+40);
//////////////////UP DOWN LINE IMPORT/////////////////////
Circle LineUp(Vec2D(xhelp+660,yhelp+40),12);
LineUp.Draw(CouleurFond);
Circle LineDown(Vec2D(xhelp+660,yhelp+260),12);
LineDown.Draw(CouleurFond);
if(mouse_x>xhelp+660-12 && mouse_x<xhelp+660+12)
{
if(mouse_y>yhelp+40-12 && mouse_y<yhelp+40+12)
{
LineUp.Draw(CouleurSurvol);
if(mouse_button==1)
{
LineUp.Draw(CouleurFader);
if(line_help>0){line_help--;}
}
}
else if(mouse_y>yhelp+260-12 && mouse_y<yhelp+260+12)
{
LineDown.Draw(CouleurSurvol);
if(mouse_button==1)
{
LineDown.Draw(CouleurFader);
if(line_help<(512-15)){line_help++;}
}
}
}
petitchiffre.Print("-",xhelp+658,yhelp+43);
petitchiffre.Print("+",xhelp+656,yhelp+262);
LineUp.DrawOutline(CouleurLigne);
LineDown.DrawOutline(CouleurLigne);

///////////TEXTE///////////////////////////////////////////////

Rect TitleUnder(Vec2D(xhelp+5,yhelp+45),Vec2D(620,25));
TitleUnder.Draw(CouleurFond);

petitchiffre.Print("ACTION" ,xhelp+10,yhelp+60);
petitchiffre.Print("Keyboard ShortCut",xhelp+210,yhelp+60);
petitchiffre.Print("SYNTAX" ,xhelp+420,yhelp+60);

for(int tx=0;tx<15;tx++)
{
if (btitle_help[tx+line_help]==1)
{
Rect TitleBar(Vec2D(xhelp+5,yhelp+75+(tx*15)),Vec2D(620,15));
TitleBar.Draw(CouleurFond);
TitleBar.Draw(CouleurSurvol.WithAlpha(0.5));
}
petitchiffre.Print(TblHelp[tx+line_help][0] ,xhelp+10,yhelp+85+(tx*15));
petitchiffre.Print(TblHelp[tx+line_help][1] ,xhelp+210,yhelp+85+(tx*15));
petitchiffre.Print(TblHelp[tx+line_help][2] ,xhelp+350,yhelp+85+(tx*15));
}

Rect Bdoctype(Vec2D(xhelp+570,yhelp+47),Vec2D(50,20));
Bdoctype.SetRoundness(rondeur_fader/2);


if(mouse_x>xhelp+570 && mouse_x<xhelp+570+50 && mouse_y>yhelp+47 && mouse_y<yhelp+47+20)
{

Bdoctype.Draw(CouleurSurvol);
if(mouse_button==1 && mouse_released==0)
{
help_lang=toggle(help_lang);
if(help_lang==0){generate_help_file_fr();}
else if(help_lang==1){generate_help_file_engl();}
mouse_released=1;
}
}
if(help_lang==0){petitchiffre.Print("FR",xhelp+585,yhelp+62);}
else if(help_lang==1){petitchiffre.Print("ENGL",xhelp+580,yhelp+62);}

Bdoctype.DrawOutline(CouleurLigne);
return(0);
}