#ifndef display_t_h
#define display_t_h



class Display
{
public:	
	static void Init(void);
	static void MenuPopupInit(short MenuPopupNr, short MenuStatusNr, short StartNr);
	static void MenuInit(void);									// initialize the menu entries
    	static void DRAW_SPLASH();									// Draws the splash screen 
    	//static void REMOVE_SPLASH(void);								// remove the splash screen
	static void DrawInitialScreen(void);								// Draws initial screen
	static void RefreshScreen(void);
	static void Rect(int x, int y, int dx, int dy, char set, unsigned long *planeaddress);


	//static void PIXELP(int x, int y, char set, unsigned long *planeaddress);
	//static void PixelOn(int x, int y, unsigned long *planeaddress);
	//static void PixelOff(int x, int y, unsigned long *planeaddress);
	static void Connect_Pixels(int x, short y, short y2, int dir, unsigned long *planeaddress);
	//static void DRAWLINEP(int x1, int y1, int x2, int y2, char set, unsigned long *plane);		// Draw a Line
	//static void Line(int x1, int y1, int x2, int y2, unsigned long *plane);				// Draw a Line


	//static void DRAWZEROLINE(int y, char set, unsigned long *plane);	
	static void TEXTOUTvbig(char *String, int x, int y, char set, unsigned long *layer);		// Draw Text at Pos X / Y with Color and BackColor
													// (FF = Transparent)
	static void TEXTOUTxvbig(char *String, int x, int y, char set, unsigned long *layer);		// Draw Text at Pos X / Y with Color and BackColor
													// (FF = Transparent)
	static void BITBITMAP(unsigned char *pointer, int x, int y, unsigned char set, unsigned long *layer);	// Draw two color bitmap

	static void GRID(unsigned long x, unsigned long y, unsigned long *layer); 			// Draw Grid subroutine
	static void GRIDDELAYED(unsigned long x, unsigned long y, unsigned long *layer); 		// Draw Grid subroutine
	static void GRIDXY(unsigned long x, unsigned long y, unsigned long *layer); 			// Draw Grid subroutine
	static void GRIDFFT(unsigned long x, unsigned long y, unsigned long *layer);			// Draw Grid subroutine

	static void StatusUpdate(void);									// Updates the Status and the Popups
	static void DRAWSTATUS(int Which, int isChanging);						// Draw Status of Channels & Timebase 0 = TB ,
													// 1 - 4 = Channels , 5 = Clock
	//static void RemoveStatusBtn(void);								// Remove Status Button
	
	static void UpdateMenu(void);
	// BF not used static void ClearMenuAsm(long start, long count);				// Clear Menu Area
	static void ClearMenuItemAsm(long which, long start, long count);                          	// Clear Menu Area	
	static void ClearMenuItemTextAsm(long which, long start, long count);                      	// Clear Menu Area		
	static void DrawMenuItemButton(int ItemNr, unsigned char pushed);
    	static void DrawMenuItem(int MenuNr,int ItemNr, unsigned char active, unsigned char caption);	// Draw Menu Items
	// BF not used static void ClearMenuItem(int ItemNr);								// Clear a Menuitem
	static void DRAWMENUPOPUP(int PopupNr);								// Popup the Menu Popup
	static void DRAWMENUPOPDOWN(void);								// Popdown the Menu Popup
	
	static void DRAWMENUBUTTONSELECT(int buttonnr);							// Draws Button Selector over menu	
	
	static void DRAWROUNDBUTTON(int posx, int posy, int sizex, int sizey, unsigned char pushed, unsigned char remove);	// Draw a Round Button	
	static void DRAWSQUAREBUTTON(int posx, int posy, int sizex, int sizey, unsigned char pushed, unsigned char remove);	// Draw a Square Button
		
	static void DrawMenuCheckBox(int posx, int posy, char checked, char active);			// Draw Checkbox in Menu
	static void DrawMenuArrow(int posx, int updn, int active);					// Draw Big Arrow
	static void DrawMenuArrowCycle(int posx, int active);						// Draw Arrow Cycle
	static void DrawMenuArrowCycle2(int posx, int active);						// Draw Arrow Cycle
	static void DrawMenuBiggerArrowCycle(int posx, int active);					// Draw the knob turn cycle
	static void DrawSubMenuArrow(int posx, int active);						// Draw the sub menu arrow

    	static void DRAW_ALL_CURSOR(void);								// Draw the all Cursos at once
    	static void DRAWMEMORY(char remove, char firstdraw, char redraw);
	static void DrawCursorDeltaValues(char set);							// Draw Cursor Data
	static void DrawQMData(char set);								// Draw Quick Measurment Data

	static void CALCCURSORDATA(void);								// Calculate Cursor Data
	static void QM_AddMeasurement(void);								// Add new measure slot
	static void CALCQMDATA(void);									// Calculate Quick Measurment Data	
	static float Measure(char nr, char channel, char type, char *pretext, char *unittext, char *returntext, char *qm_vertical_active, char *qm_horizontal_active);// make a measurement
    	static float MEASUREVOLTAGE(char channel, int points);						// Calculate the Voltage String
    	static float MEASURETIME(char sec_hz, int points);	    					// Calculate the Time String sec_hz 1 = seconds,
													// sec_hz = 2 = Hz
    //static float MEASUREVOLTAGE(char channel, int points, char *UnitString);	// Calculate the Voltage String
    //static float MEASURETIME(char sec_hz, int points, char *UnitString);	    // Calculate the Time String sec_hz 1 = seconds, sec_hz = 2 = Hz

	static void CALCTRIGGER(void);									// Calculate Trigger Data
	static void CALCPRETRIGGER(void);								// Calclulate Timebase Data
	//static void CALCTIMEBASE(void);								// Calclulate Timebase Data
	static void CALCVOLTAGE(char channel, char *String);						// Calculate the Voltage String
	static void RecalcTimeParameters(void); 
	static void RecalcTriggerPos(void);                            					// Recalc pre_reg and Trigger Pos on Display

//BF del	static void DRAWZERO(int inr, char changed);							// Draw one ZeroLine , would be removed if chaSnged
	static void DRAWSIGNS(void);
    	
	static void RemoveZeroSign(long addressold);
	static void DrawZeroSign(unsigned char *sign, long addressnew);
	static void DrawZeroSignXY(int position, char set);
	static void OverDrawZeroSign(unsigned char *sign, long addressnew);
	static void RemoveZeroSignBack(long addressold);
	static void DrawZeroSignBack(unsigned char *sign, long addressnew);

	static void CLEAR2BYTE(long addressold);            	
	static void WRITE2BYTE(unsigned char byte1, unsigned char byte2, long addressnew);
	static void OVERWRITE2BYTE(unsigned char byte1, unsigned char byte2, long addressnew);
	
	static void WRITE2BYTEBACK(unsigned char byte1, unsigned char byte2, long addressnew);
	static void CLEAR2BYTEBACK(long addressold);
      	
	//static void DRAWZEROPOPUP(int channel);								// Draws a popup with the Zerolevel
	//static void DRAWZEROPOPDOWN(void);								// Popdown the Zerolevel Popup
	
	static void DrawSignals(void);
	//static void Clear_Flips(void);	// BF not used

	//BF del not used static void CopySignal(unsigned long Buffer_Adr1, unsigned long Plane_Adr1, unsigned long Buffer_Adr2, unsigned long Plane_Adr2, unsigned long Buffer_Adr3, unsigned long Plane_Adr3, unsigned char count);

	static void DRAWSIGNAL_TY(unsigned int channel, unsigned char windows, unsigned int timefactor, unsigned int ixstart, unsigned char *signal);	//BF Draw T-Y time signal

	static void DRAWSIGNAL_XY(int channel_x, int channel_y, unsigned int start, unsigned char *signal_x, unsigned char *signal_y);	//BF Draw X-Y signal

	static void DRAWSPECTRUM_FY(void);	//BF Draw sprectrum

    	static void Test_Pixels(int x, int y, int y2, int dir, unsigned long *planeaddress);
	//----------------------------------------------------------------------------------------------------------------------------------------------------------

	
	static void DrawColorDemoBox(int posx, int posy, int sizex, int sizey, unsigned long *planeaddress);
	static void	ColorDemo(void);
	static void	ColorDemo2(void);
	static void	ColorDemo3(void);
	static void	ColorDemo5(void);
	static void	ColorDemo6(void);
	

	static void FFT_DrawStatus(unsigned char clear);
	static void FFT_CalcCursorData(void);

	//----------------------------------------------------------------------------------------------------------------------------------------------------------
	static void LOGA_DrawTraces(void);
	static void DRAWLogicTrace(unsigned int channel, unsigned char windows, unsigned int timefactor, unsigned int ixstart, unsigned char *signal);

};

#endif


