Clean GFX code please

please i need to clean the code



procedure SetOrigin(x0, y0) {
	global _x0, _y0;
	_x0 = x0; _y0 = y0;
}


procedure SetOriginRel(x0, y0) {
	global _x0, _y0;
	_x0 += x0; _y0 += y0;
}

_cursorMouseButtons = GetCursorMouseButtons();
DT_CENTER = 1; DT_VCENTER = 4 | 32; 

 
procedure GfxSetColors(fgColor, bgColor) {
	GfxSetTextColor(fgColor); GfxSetBkColor(bgColor); 
	GfxSelectPen(fgColor); GfxSelectSolidBrush(bgColor);
}

procedure GfxRect(x, y, width, height, color) {
	global _x0, _y0;
	x = x+_x0; y = y+_y0;
	GfxSelectPen(color); GfxSelectSolidBrush(color);
    GfxRoundRect(x,y,x+width,y+height,5,5);
}

procedure GfxHRule(x, y, width, thickness, color) {
	global _x0, _y0;
	x = x+_x0; y = y+_y0;
	GfxSelectPen(color); GfxSelectSolidBrush(color);
	y = y - thickness*0.5;
    GfxRoundRect(x,y,x+width,y+thickness,1,1);
}

procedure GfxVRule(x, y, height, thickness, color) {
	global _x0, _y0;
	x = x+_x0; y = y+_y0;
	GfxSelectPen(color); GfxSelectSolidBrush(color);
	x = x - thickness*0.5;
    GfxRoundRect(x,y,x+thickness,y+height,1,1);
}

// format: 0 left, 1 center, 2 right
procedure GfxLabel(text, x, y, width, height, format) {
	global _x0, _y0;
	x = x+_x0; y = y+_y0;
	GfxDrawText( text, x, y, x+width, y+height, format | DT_VCENTER ); 
}


procedure GfxFrame(titl, hheight, x, y, width, height, textColor, bgColor) {
	global _x0, _y0;
	x = x+_x0; y = y+_y0;
	GfxSetColors(textColor, bgColor);
    GfxRoundRect(x, y+0.5*hheight, x+width, y+height, 5, 5);
    if (titl != "") {
		w = GfxGetTextWidth(titl)*0.68; m = x+width*0.5;
		// GfxRectangle(m-w, y+1, m+w, y+hheight-1); 
		GfxRoundRect(m-w, y+1, m+w, y+hheight-1, 5, 5); 
		GfxDrawText(titl, x, y, x+width, y+hheight, 1|4|32);
    }
}

function GfxGetState(id) {
	return Nz(StaticVarGet("GfxState"+id+GetChartID()), 0);
}
function PointInside(x0, y0, x, y, width, height) {
    global _x0, _y0;
	x = x+_x0; y = y+_y0;
    x0 = x0+_x0; y0 = y0+_y0;
	return ((x0 >= x) && (y0 >= y) && (x0 <= (x+width)) && (y0 <= (y+height)));
}

function LeftClickInside(x, y, width, height) {
	global _cursorMouseButtons, _x0, _y0;
	local px, py, res;
	
	// x = x+_x0; y = y+_y0;
	res = False;
	if (_cursorMouseButtons & 8) { // click
		px = GetCursorXPosition(1); 
		py = GetCursorYPosition(1); 
		res = PointInside(px, py, x, y, width, height);
	}
	return res;
}

procedure GfxSetState(id, val) {
	StaticVarSet("GfxState"+id+GetChartID(), val);
}

function GfxHTabs(id, headers, headheight, x, y, width, height, colorfg, colorbg) {
	global _x0, _y0;
	local px,choice,na,i,n,header,w, wi, prevwi;
	
	x = x+_x0; y = y+_y0; choice = GfxGetState(id);
	GfxSetColors(colorfg, colorbg);
	
	for(n = 0; (header = StrExtract(headers,n)) != ""; ++n) {};
	w = width/n; wi = x; prevwi = x;
	if (LeftClickInside(x,y,width,headheight)) {
		px = GetCursorXPosition( 1 );
		// choice = floor((px - x)/w);
		// wi = x; prevwi = x;
		for(i = 0; (header = StrExtract(headers,i)) != ""; ++i) {
			wi = wi + 1.32*GfxGetTextWidth(header);
			if ((px > prevwi) && (px < wi))  { choice = i; break; }
		}
		GfxSetState(id, choice); // StaticVarSet(na, choice);
	}

	GfxSetBkMode(1);
	// Draw Zone & Tabs
	wi = x; prevwi = x;
	for(i = 0; (header = StrExtract(headers,i)) != ""; ++i) {
		wi = wi + 1.32*GfxGetTextWidth(header);

		// GfxSelectSolidBrush(colorbg); 
		GfxRoundRect(prevwi,y,wi,y+headheight+5,5,5); 
		if (i != choice) {
			GfxSelectHatchBrush(colorfg,3); 
			GfxRoundRect(prevwi,y,wi,y+headheight+5,5,5); 
			GfxSelectSolidBrush( colorbg );
		} else {
			wic = wi; prevwic = prevwi;
		}
		GfxDrawText(header, prevwi, y, wi, y+headheight+5, 1|4|32);
		// GfxTextOut(header,0.5*(prevwi+wi),y);//+headheight); //*0.75);
		prevwi = wi;
	}
	GfxRectangle(x,y+headheight,x+width,y+height);
	GfxSelectPen(colorbg,1); GfxMoveTo(prevwic, y+headheight); GfxLineTo(wic, y+headheight); 
	
	return choice;
}
procedure GfxDemos(x,y) {

	SetOrigin(x,y);
	////
	//GfxRect(20, 60, 340, 280, colorLavender);
	GfxHRule(30, 70, 310, 2, colorGrey40);
	//GfxVRule(330, 80, 240, 1, colorGrey40);
	//GfxFrame(" Frame ", 30, 60, 140, 200, 120, colorWhite, colorGrey40);
	//GfxLabel("Label", 100, 260, 60, 30, 1);


	/////
	//GfxFrame("Gfx Tabs/Accordion", 30, 870, 50, 460, 760, colorWhite, colorBlack);
	n = GfxHTabs("HTab1", "Stocks,Currencies,Bonds,News", 30, 900, 100, 400, 200, colorBlue, colorLavender); 
	switch(n) {
		case 0: GfxLabel("The Stocks Page", 950, 200, 300, 30, 1); break;
		case 1: GfxLabel("The Currencies Page", 950, 200, 300, 30, 1); break;
		case 2: GfxLabel("The Bonds Page", 950, 200, 300, 30, 1); break;
		case 3: GfxLabel("...and News !", 950, 200, 300, 30, 1); break;
	}
	
	
	
	
}



x = Param("x_origin", 20, 0, 1980, 20);
y = Param("y_origin", 20, 0, 1024, 20);
demo = ParamToggle("Show Demo", "No|Yes", 1);

if (demo) {
	//GfxGradientRect(0,0, 1980, 1000, ColorBlend(colorBlueGrey, colorBlack), colorBlack);
	 GfxDemos(x,y);
	//GuiDemos(x+500, y+390);
//	DemoCharts(x+1400, y+50);
//	DemoGrid(x+470, y+620);
}

i need only this in the photo

to gui

thank you

It is not clear what do you expect? Did you write the code yourself, or did you copy it from somewhere?
As it is the code works correctly without errors and produces the tab-like display already, so it is not clear what else you expect.
The only thing is that it uses FIXED co-ordinates therefore draws tabs starting from X coordinate == 900, which may not be what you want.
You can adjust it in the code:

// change coords here
	n = GfxHTabs("HTab1", "Stocks,Currencies,Bonds,News", 30, 100, 100, 400, 200, colorBlue, colorLavender); 
	switch(n) {
		case 0: GfxLabel("The Stocks Page", 150, 200, 300, 30, 1); break;
		case 1: GfxLabel("The Currencies Page", 150, 200, 300, 30, 1); break;
		case 2: GfxLabel("The Bonds Page", 150, 200, 300, 30, 1); break;
		case 3: GfxLabel("...and News !", 150, 200, 300, 30, 1); break;
	}
}

Unfortunately your question isn't clear enough and does not provide all necessary details to give you an answer. Please follow this advice: How to ask a good question

i take it from long code

but what i need only the tabe as the pkoto

the code has extra lines that is not belong to the code

thank you

thank you Tomaze

this the code what i need . i am ok now



procedure SetOrigin(x0, y0) {
	global _x0, _y0;
	_x0 = x0; _y0 = y0;
}


_cursorMouseButtons = GetCursorMouseButtons();
DT_CENTER = 1; DT_VCENTER = 4 | 32; 

procedure GfxSetColors(fgColor, bgColor) {
	GfxSetTextColor(fgColor); GfxSetBkColor(bgColor); 
	GfxSelectPen(fgColor); GfxSelectSolidBrush(bgColor);
}



// format: 0 left, 1 center, 2 right
procedure GfxLabel(text, x, y, width, height, format) {
	global _x0, _y0;
	x = x+_x0; y = y+_y0;
	GfxDrawText( text, x, y, x+width, y+height, format | DT_VCENTER ); 
}


function GfxGetState(id) {
	return Nz(StaticVarGet("GfxState"+id+GetChartID()), 0);
}
function PointInside(x0, y0, x, y, width, height) {
    global _x0, _y0;
	x = x+_x0; y = y+_y0;
    x0 = x0+_x0; y0 = y0+_y0;
	return ((x0 >= x) && (y0 >= y) && (x0 <= (x+width)) && (y0 <= (y+height)));
}

function LeftClickInside(x, y, width, height) {
	global _cursorMouseButtons, _x0, _y0;
	local px, py, res;
	
	// x = x+_x0; y = y+_y0;
	res = False;
	if (_cursorMouseButtons & 8) { // click
		px = GetCursorXPosition(1); 
		py = GetCursorYPosition(1); 
		res = PointInside(px, py, x, y, width, height);
	}
	return res;
}

procedure GfxSetState(id, val) {
	StaticVarSet("GfxState"+id+GetChartID(), val);
}

function GfxHTabs(id, headers, headheight, x, y, width, height, colorfg, colorbg) {
	global _x0, _y0;
	local px,choice,na,i,n,header,w, wi, prevwi;
	
	x = x+_x0; y = y+_y0; choice = GfxGetState(id);
	GfxSetColors(colorfg, colorbg);
	
	for(n = 0; (header = StrExtract(headers,n)) != ""; ++n) {};
	w = width/n; wi = x; prevwi = x;
	if (LeftClickInside(x,y,width,headheight)) {
		px = GetCursorXPosition( 1 );
		// choice = floor((px - x)/w);
		// wi = x; prevwi = x;
		for(i = 0; (header = StrExtract(headers,i)) != ""; ++i) {
			wi = wi + 1.32*GfxGetTextWidth(header);
			if ((px > prevwi) && (px < wi))  { choice = i; break; }
		}
		GfxSetState(id, choice); // StaticVarSet(na, choice);
	}

	GfxSetBkMode(1);
	// Draw Zone & Tabs
	wi = x; prevwi = x;
	for(i = 0; (header = StrExtract(headers,i)) != ""; ++i) {
		wi = wi + 1.32*GfxGetTextWidth(header);

		// GfxSelectSolidBrush(colorbg); 
		GfxRoundRect(prevwi,y,wi,y+headheight+5,5,5); 
		if (i != choice) {
			GfxSelectHatchBrush(colorfg,3); 
			GfxRoundRect(prevwi,y,wi,y+headheight+5,5,5); 
			GfxSelectSolidBrush( colorbg );
		} else {
			wic = wi; prevwic = prevwi;
		}
		GfxDrawText(header, prevwi, y, wi, y+headheight+5, 1|4|32);
		prevwi = wi;
	}
	GfxRectangle(x,y+headheight,x+width,y+height);
	GfxSelectPen(colorbg,1); GfxMoveTo(prevwic, y+headheight); GfxLineTo(wic, y+headheight); 
	
	return choice;
}
procedure GfxDemos(x,y) {

	SetOrigin(x,y);
	
	
	n = GfxHTabs("HTab1", "Stocks,Currencies,Bonds,News", 30, 900, 100, 400, 200, colorBlue, colorLavender); 
	
	
	
}


x = Param("x_origin", 20, 0, 1980, 20);
y = Param("y_origin", 20, 0, 1024, 20);
demo = ParamToggle("Show Demo", "No|Yes", 1);

if (demo) {
	
	 GfxDemos(x,y);
	
}

thank you

Dear Tomaze

Dear all

is there simple code for this code

procedure SetOrigin(x0, y0) {
	global _x0, _y0;
	_x0 = x0; _y0 = y0;
}


_cursorMouseButtons = GetCursorMouseButtons();
DT_CENTER = 1; DT_VCENTER = 4 | 32; 

procedure GfxSetColors(fgColor, bgColor) {
	GfxSetTextColor(fgColor); GfxSetBkColor(bgColor); 
	GfxSelectPen(fgColor); GfxSelectSolidBrush(bgColor);
}



// format: 0 left, 1 center, 2 right
procedure GfxLabel(text, x, y, width, height, format) {
	global _x0, _y0;
	x = x+_x0; y = y+_y0;
	GfxDrawText( text, x, y, x+width, y+height, format | DT_VCENTER ); 
}


function GfxGetState(id) {
	return Nz(StaticVarGet("GfxState"+id+GetChartID()), 0);
}
function PointInside(x0, y0, x, y, width, height) {
    global _x0, _y0;
	x = x+_x0; y = y+_y0;
    x0 = x0+_x0; y0 = y0+_y0;
	return ((x0 >= x) && (y0 >= y) && (x0 <= (x+width)) && (y0 <= (y+height)));
}

function LeftClickInside(x, y, width, height) {
	global _cursorMouseButtons, _x0, _y0;
	local px, py, res;
	
	// x = x+_x0; y = y+_y0;
	res = False;
	if (_cursorMouseButtons & 8) { // click
		px = GetCursorXPosition(1); 
		py = GetCursorYPosition(1); 
		res = PointInside(px, py, x, y, width, height);
	}
	return res;
}

procedure GfxSetState(id, val) {
	StaticVarSet("GfxState"+id+GetChartID(), val);
}

function GfxHTabs(id, headers, headheight, x, y, width, height, colorfg, colorbg) {
	global _x0, _y0;
	local px,choice,na,i,n,header,w, wi, prevwi;
	
	x = x+_x0; y = y+_y0; choice = GfxGetState(id);
	GfxSetColors(colorfg, colorbg);
	
	for(n = 0; (header = StrExtract(headers,n)) != ""; ++n) {};
	w = width/n; wi = x; prevwi = x;
	if (LeftClickInside(x,y,width,headheight)) {
		px = GetCursorXPosition( 1 );
		// choice = floor((px - x)/w);
		// wi = x; prevwi = x;
		for(i = 0; (header = StrExtract(headers,i)) != ""; ++i) {
			wi = wi + 1.32*GfxGetTextWidth(header);
			if ((px > prevwi) && (px < wi))  { choice = i; break; }
		}
		GfxSetState(id, choice); // StaticVarSet(na, choice);
	}

	GfxSetBkMode(1);
	// Draw Zone & Tabs
	wi = x; prevwi = x;
	for(i = 0; (header = StrExtract(headers,i)) != ""; ++i) {
		wi = wi + 1.32*GfxGetTextWidth(header);

		// GfxSelectSolidBrush(colorbg); 
		GfxRoundRect(prevwi,y,wi,y+headheight+5,5,5); 
		if (i != choice) {
			GfxSelectHatchBrush(colorfg,3); 
			GfxRoundRect(prevwi,y,wi,y+headheight+5,5,5); 
			GfxSelectSolidBrush( colorbg );
		} else {
			wic = wi; prevwic = prevwi;
		}
		GfxDrawText(header, prevwi, y, wi, y+headheight+5, 1|4|32);
		prevwi = wi;
	}
	GfxRectangle(x,y+headheight,x+width,y+height);
	GfxSelectPen(colorbg,1); GfxMoveTo(prevwic, y+headheight); GfxLineTo(wic, y+headheight); 
	
	return choice;
}
procedure GfxDemos(x,y) {

	SetOrigin(x,y);
	
	
	n = GfxHTabs("HTab1", "Stocks,Currencies,Bonds,News", 30, 900, 100, 400, 200, colorBlue, colorLavender); 
	
	
	
}


x = Param("x_origin", 20, 0, 1980, 20);
y = Param("y_origin", 20, 0, 1024, 20);
demo = ParamToggle("Show Demo", "No|Yes", 1);

if (demo) {
	
	 GfxDemos(x,y);
	
}

something I can modify it easy

as modify the location and so on .

thank

like adding text boxes for each tape
and getting to them easy in the code

as this one

to gui 2

all text boxes will show in all tape

how every signal tape has it is own text boxes



procedure SetOrigin(x0, y0) {
	global _x0, _y0;
	_x0 = x0; _y0 = y0;
}


_cursorMouseButtons = GetCursorMouseButtons();
DT_CENTER = 1; DT_VCENTER = 4 | 32; 

procedure GfxSetColors(fgColor, bgColor) {
	GfxSetTextColor(fgColor); GfxSetBkColor(bgColor); 
	GfxSelectPen(fgColor); GfxSelectSolidBrush(bgColor);
}



// format: 0 left, 1 center, 2 right
procedure GfxLabel(text, x, y, width, height, format) {
	global _x0, _y0;
	x = x+_x0; y = y+_y0;
	GfxDrawText( text, x, y, x+width, y+height, format | DT_VCENTER ); 
}


function GfxGetState(id) {
	return Nz(StaticVarGet("GfxState"+id+GetChartID()), 0);
}
function PointInside(x0, y0, x, y, width, height) {
    global _x0, _y0;
	x = x+_x0; y = y+_y0;
    x0 = x0+_x0; y0 = y0+_y0;
	return ((x0 >= x) && (y0 >= y) && (x0 <= (x+width)) && (y0 <= (y+height)));
}

function LeftClickInside(x, y, width, height) {
	global _cursorMouseButtons, _x0, _y0;
	local px, py, res;
	
	// x = x+_x0; y = y+_y0;
	res = False;
	if (_cursorMouseButtons & 8) { // click
		px = GetCursorXPosition(1); 
		py = GetCursorYPosition(1); 
		res = PointInside(px, py, x, y, width, height);
	}
	return res;
}

procedure GfxSetState(id, val) {
	StaticVarSet("GfxState"+id+GetChartID(), val);
}
function SetNumber(idEdit, Value, x, y, width, height, textColor, bgColor) {
    global _x0, _y0;
	local rc;
	
    x = x+_x0; y = y+_y0;
    rc = GuiEdit( idEdit, x, y, width, height, 0); 
    GuiSetValue(idEdit, Value ); 
    GuiSetColors( idEdit, idEdit, 1, textColor, bgColor, textColor);
   
    return Value;
}

function EditNumber( idEdit, initialValue, x, y, width, height, textColor, bgColor )
{  // this function hold the text for the next restart of Amibroker
    global _x0, _y0;
    local rc ;

    x = x + _x0;     y = y + _y0;
    rc = GuiEdit( idEdit, x, y, width, height, notifyHitReturn ); //

    ID = GuiGetEvent( 0, 0 );     event = GuiGetEvent( 0, 1 );
    if( ID == idEdit ) StaticVarSetText( "sV" + idEdit,  GuiGetText( idEdit ), 1 );

    if( rc == guiNew )
    {  // after restart Amibroker read FIRST these Static Line
        txt = StaticVarGettext( "sV" + idEdit );
        GuiSetText( txt, idEdit );
    }

    GuiSetColors( idEdit, idEdit, 1, textColor, bgColor, textColor );

    return GuiGetValue( idEdit );
}
function GfxHTabs(id, headers, headheight, x, y, width, height, colorfg, colorbg) {
	global _x0, _y0;
	local px,choice,na,i,G,header,w, wi, prevwi;
	
	x = x+_x0; y = y+_y0; choice = GfxGetState(id);
	GfxSetColors(colorfg, colorbg);
	
	for(G = 0; (header = StrExtract(headers,G)) != ""; ++G) {};
	w = width/G; wi = x; prevwi = x;
	if (LeftClickInside(x,y,width,headheight)) {
		px = GetCursorXPosition( 1 );
		// choice = floor((px - x)/w);
		// wi = x; prevwi = x;
		for(i = 0; (header = StrExtract(headers,i)) != ""; ++i) {
			wi = wi + 1.32*GfxGetTextWidth(header);
			if ((px > prevwi) && (px < wi))  { choice = i; break; }
		}
		GfxSetState(id, choice); // StaticVarSet(na, choice);
	}

	GfxSetBkMode(1);
	// Draw Zone & Tabs
	wi = x; prevwi = x;
	for(i = 0; (header = StrExtract(headers,i)) != ""; ++i) {
		wi = wi + 1.32*GfxGetTextWidth(header);

		// GfxSelectSolidBrush(colorbg); 
		GfxRoundRect(prevwi,y,wi,y+headheight+5,5,5); 
		if (i != choice) {
			GfxSelectHatchBrush(colorfg,3); 
			GfxRoundRect(prevwi,y,wi,y+headheight+5,5,5); 
			GfxSelectSolidBrush( colorbg );
		} else {
			wic = wi; prevwic = prevwi;
		}
		GfxDrawText(header, prevwi, y, wi, y+headheight+5, 1|4|32);
		prevwi = wi;
	}
	GfxRectangle(x,y+headheight,x+width,y+height);
	GfxSelectPen(colorbg,1); GfxMoveTo(prevwic, y+headheight); GfxLineTo(wic, y+headheight); 
	
	return choice;
}
procedure GfxDemos(x,y) {

local  n,n2,n3,n4,n5,n6,n7,n8,n9,n10,n11,
	      n12,n13,n14,n15,n16,n17,n18,n19,n20
	      ,n21,n22,txt,Prefix,Xpx,Flags;

	SetOrigin(x,y);
	
	
	G = GfxHTabs("HTab1", "Stocks,Currencies,Bonds,News", 30, 100, 100, 400, 200, colorBlue, colorLavender); 
	
	
	n3 = SetNumber(3, (10)/2, 180, 150, 80, 25, colorBlue, colorYellow);//textbox # , formula , LIFT / RIGHT , HIGHT/LOW , WIDTH OF THE TEXT BOX , HIGHT OF THE TEXT BOX.
	n4 = SetNumber(4, (10)/2, 280, 150, 80, 25, colorBlue, colorYellow);
	n5 = SetNumber(5, (10)/2, 380, 150, 80, 25, colorBlue, colorYellow);
	
	
	n7 = SetNumber(7,(10)/3 , 180, 240, 80, 25, colorBlue, colorYellow);
	n8 = SetNumber(8, (10)/3, 280, 240, 80, 25, colorBlue, colorYellow);
	n9 = SetNumber(9, (10)/3, 380, 240, 80, 25, colorBlue, colorYellow);
   
}


x = Param("x_origin", 20, 0, 1980, 20);
y = Param("y_origin", 20, 0, 1024, 20);
demo = ParamToggle("Show Demo", "No|Yes", 1);

if (demo) {
	
	 GfxDemos(x,y);
	
}

i use if but still

if ( G == GfxHTabs("HTab1", "Stocks", 30, 100, 100, 400, 200, colorBlue, colorLavender)) {
	
	n3 = SetNumber(3, (10)/2, 180, 150, 80, 25, colorBlue, colorYellow);//textbox # , formula , LIFT / RIGHT , HIGHT/LOW , WIDTH OF THE TEXT BOX , HIGHT OF THE TEXT BOX.
	n4 = SetNumber(4, (10)/2, 280, 150, 80, 25, colorBlue, colorYellow);
	n5 = SetNumber(5, (10)/2, 380, 150, 80, 25, colorBlue, colorYellow);
	
	
	n7 = SetNumber(7,(10)/3 , 180, 240, 80, 25, colorBlue, colorYellow);
	n8 = SetNumber(8, (10)/3, 280, 240, 80, 25, colorBlue, colorYellow);
	n9 = SetNumber(9, (10)/3, 380, 240, 80, 25, colorBlue, colorYellow);
			
		} else {
			
		}

I used switch(n) as Mr:Tomaze said

switch(G) {
		case 0: 
		n3 = SetNumber(3, (10)/2, 180, 150, 80, 25, colorBlue, colorYellow); 
		n4 = SetNumber(4, (10)/2, 280, 150, 80, 25, colorBlue, colorYellow);
		n5 = SetNumber(5, (10)/2, 380, 150, 80, 25, colorBlue, colorYellow); break;
		
		case 1:  
		 break;
		
		case 2:  
		n7 = SetNumber(7,(100)/2 , 180, 240, 80, 25, colorBlue, colorYellow); 
	    n8 = SetNumber(8, (10)/3, 280, 240, 80, 25, colorBlue, colorYellow);
	     n9 = SetNumber(9, (10)/3, 380, 240, 80, 25, colorBlue, colorYellow);break;
		case 3:  break;

This topic was automatically closed 100 days after the last reply. New replies are no longer allowed.